package com.mallcloud.mall.product.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

@ApiModel(value = "SpuDTO", description = "spu信息")
@Data
public class SpuPublishDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "品牌ID不能为空")
    @ApiModelProperty(value = "品牌ID")
    private Long brandId;

    @NotNull(message = "分类ID不能为空")
    @ApiModelProperty(value = "分类ID")
    private Long categoryId;

    @ApiModelProperty(value = "店铺分类ID")
    private Long shopCategoryId;

    @ApiModelProperty(value = "店铺id")
    private Long shopId;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称")
    private String name;

    @NotBlank(message = "卖点不能为空")
    @ApiModelProperty(value = "卖点")
    private String sellingPoint;

    @NotBlank(message = "商品介绍主图不能为空")
    @ApiModelProperty(value = "商品介绍主图")
    private String mainImgUrl;

    @NotBlank(message = "商品图片不能为空")
    @ApiModelProperty(value = "商品图片 多个图片逗号分隔")
    private String imgUrls;

    @NotNull(message = "序号不能为空")
    @ApiModelProperty(value = "序号")
    private Integer sortOrder;

    @NotBlank(message = "商品详情不能为空")
    @ApiModelProperty(value = "商品详情")
    private String detail;

    @NotNull(message = "总库存不能为空")
    @ApiModelProperty(value = "总库存")
    private Integer stock;

    @Size(min = 1, message = "sku信息不能为空")
    @ApiModelProperty(value = "sku信息")
    private List<SkuPublishDTO> skuPublishList;

    @Size(min = 1, message = "规格不能为空")
    @ApiModelProperty(value = "规格")
    private List<AttrOptionDTO> spuAttrList;
}
